#ifndef _UNIHAN_EXT_STATUS_H
#define _UNIHAN_EXT_STATUS_H

typedef struct {
	char *id;
	char *cname;
} IMInfo;

typedef enum {
        UNIHAN_TCSC_NO_CONV,
        UNIHAN_TCSC_TO_SIMP,
        UNIHAN_TCSC_TO_TRAD
} UnihanTCSCMode;

typedef struct _StatusModel {
        GList *imList;
        GList *imCurrList;
        IMInfo *currIM;
        UnihanTCSCMode tcsc;
        gboolean tcscAvailable;
        gboolean unihanAvailable;
	void *propertyList;
	int propertyCount;
} StatusModel;

typedef struct _StatusControl {
	GtkWidget *hbox;		// the hbox for everything in the window
	GtkWidget *icon;		// the Unihan icon on the left
	GtkWidget *imLabel;		// input method label on button
	GtkWidget *imButton;		// input method selection button
	GtkWidget *propertyHBox;	//property hbox
	GtkWidget *propertyButton;
	GtkWidget *propertyLabel;
	GtkWidget *tcscLabel;		// TC/SC label on button
	GtkWidget *tcscButton;		// TC/SC button
} StatusControl;

typedef struct _StatusWindow {
	StatusModel *model;

	gboolean runAsApplet;
	gboolean doNotHide;
	GtkWidget *appletWindow;
	GtkWidget *appletFrame;
	StatusControl *controls;

	GtkWidget *mainMenu;
	GtkWidget *tcscMenu;
	GtkWidget *imMenu;
	GtkWidget *propertyMenu;
} StatusWindow;

#define VOID_IM_ID 0xFFFF
#define VOID_IC_ID 0xFFFF

extern xaux_class_t *xc_;
extern int im_;
extern int ic_;
extern int xbe_im;
extern int xbe_ic;

extern StatusModel *model;
extern StatusWindow *window;

#endif /* _UNIHAN_EXT_STATUS_H */
